<template>
  <div class="echart-series-pie">
    <FormItem
      :form="form"
      option="echart.series.0.radius.0"
      :label="$demoi18n('echart.label.pieChartInnerDiameter')"
      type="number"
      :show-unit="true"
      serie-type="pie"
    />
    <FormItem
      :form="form"
      option="echart.series.0.radius.1"
      :label="$demoi18n('echart.label.pieChartOuterDiameter')"
      type="number"
      :show-unit="true"
      serie-type="pie"
    />
    <FormItem
      :form="form"
      option="echart.series.0.center.0"
      :label="$demoi18n('echart.label.centerPositionX')"
      type="number"
      :show-unit="true"
      serie-type="pie"
    />
    <FormItem
      :form="form"
      option="echart.series.0.center.1"
      :label="$demoi18n('echart.label.centerPositionY')"
      type="number"
      :show-unit="true"
      serie-type="pie"
    />
    <FormItem
      :form="form"
      option="echart.series.0.selectedMode"
      :label="$demoi18n('echart.label.selectedMode')"
      type="select"
      :options="pieSelectModes"
      serie-type="pie"
    />
    <FormItem
      :form="form"
      option="echart.series.0.startAngle"
      :label="$demoi18n('echart.label.startAngle')"
      type="number"
      serie-type="pie"
    />
    <FormItem
      :form="form"
      option="echart.backgroundColor"
      :label="$demoi18n('word.backgroundColor')"
      type="color"
    />
  </div>
</template>
<script>
import FormItem from '@/components/common/echart/form-item.vue';
import echartUtil from '@/components/common/echart/echart-util.js';
import { pieSelectModes } from '@/components/common/echart/form-item-options.js';
export default {
  components: { FormItem },
  props: {
    form: Object,
  },
  data() {
    return {
      pieSelectModes,
    };
  },
  computed: {},
  watch: {
    'form.echart.backgroundColor'(color) {
      const titleCss = this.form.cssStyle && this.form.cssStyle.title;
      if (titleCss) {
        titleCss.backgroundColor = color;
      }
    },
  },
  methods: {},
};
</script>
<style lang="less" scoped></style>
